home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
351-375
/
disk_361
/
xcolor-lib
/
demo_sources
/
c_demo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
1KB
|
47 lines
/*
C-Demo for XColor-Library
© by Roger Fischlin,
created 24.1.90 by Ølli
for Lettuce-C V5.04
calls the color-request for current screen
*/
#include <exec/types.h>
#include <proto/xcolor.h>
#include <proto/exec.h>
#include <intuition/intuitionbase.h>
struct IntuitionBase *IntuitionBase;
struct ColorRequest creq;
int _main(void);
int _main()
{
/* open library */
XColorBase=(struct XColorBase*)OpenLibrary("xcolor.library",XC_VERSION);
if(!XColorBase) return(20);
/* find current screen */
IntuitionBase=XColorBase->XCb_IntuitionBase;
creq.Screen=IntuitionBase->ActiveScreen;
if(!creq.Screen) return(20);
/* fill in requester struct */
creq.TextColor=2;
creq.BackColor=1;
creq.GBorderColor=3;
creq.GTextColor=0;
creq.TopEdge=20;
creq.LeftEdge=120;
creq.ScreenTitle="Just a test...";
creq.DefaultWTitle="...for the creq!";
/* do the request */
ColorRequester(&creq);
/* and exit */
CloseLibrary((struct Library*)XColorBase);
return(0);
}